package com.example.bookstore.service;

import com.example.bookstore.form.orderform.InsertOrderForm;
import com.example.bookstore.vo.ResultVO;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.text.ParseException;

@Service
@Repository
public interface OrderService {

    //新增一条订单信息
    ResultVO InsertOrder(InsertOrderForm insertOrderForm) throws ParseException;

    //删除一条订单信息
    ResultVO DeleteOrder(Integer orderId);

    //更新支付状态
    ResultVO UpdatePayState(Integer orderId);

    //根据id查询某次订单具体情况
    ResultVO SelectOrderById(Integer orderId);

    //根据订单创建者查询某个用户所有的订单
    ResultVO SelectOrderByUser(Integer userId);

    //显示本周热卖前几名书籍
    ResultVO ShowAllOrderByWeek();

}
